//
//  HomeTongueCell.m
//  Ginix
//
//  Created by 冯志强 on 2025/2/23.
//

#import "HomeTongueCell.h"
#import "HomeTongueView.h"
#import "HomeTongueShapeView.h"
#import "HomeTongueCoatingView.h"
#import "HomeTongueQualityView.h"

@interface HomeTongueCell()
@property (nonatomic,strong) HomeTongueView * nameView;
@property (nonatomic,strong) HomeTongueShapeView * shapeView;
@property (nonatomic,strong) HomeTongueCoatingView * coatingView;
@property (nonatomic,strong) HomeTongueQualityView * qualityView;
@end

@implementation HomeTongueCell

-(void)setSubViewLayout{
    [super setSubViewLayout];
    
    self.titleLabel.text = @"舌象";
    
    [self addSubview:self.nameView];
    [_nameView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.iconView.mas_bottom).offset(15 * FMScaleX);
        make.left.right.equalTo(@0);
        make.height.mas_offset(100 * FMScaleX);
    }];
//    [self addSubview:self.shapeView];
//    [_shapeView mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(self.nameView.mas_bottom).offset(5 * FMScaleX);
//        make.left.right.equalTo(@0);
//        make.height.mas_offset(340 * FMScaleX);
//    }];
    [self addSubview:self.coatingView];
    [_coatingView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.nameView.mas_bottom).offset(5 * FMScaleX);
        make.left.right.equalTo(@0);
        make.height.mas_offset(100 * FMScaleX);
    }];
    [self addSubview:self.qualityView];
    [_qualityView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.coatingView.mas_bottom).offset(5 * FMScaleX);
        make.left.right.equalTo(@0);
        make.height.mas_offset(200 * FMScaleX);
    }];
}


-(void)setInfoModel:(HomeAllCheckInfoModel *)infoModel{
    
    [self.nameView setInfoModel:infoModel];
    [self.coatingView setInfoModel:infoModel];
    [self.qualityView setInfoModel:infoModel];
}

-(HomeTongueView *)nameView{
    
    if (!_nameView) {
        _nameView = [[HomeTongueView alloc]init];
    }
    return _nameView;
}
-(HomeTongueShapeView *)shapeView{
    
    if (!_shapeView) {
        _shapeView = [[HomeTongueShapeView alloc]init];
    }
    return _shapeView;
}
-(HomeTongueCoatingView *)coatingView{
    
    if (!_coatingView) {
        _coatingView = [[HomeTongueCoatingView alloc]init];
    }
    return _coatingView;
}
-(HomeTongueQualityView *)qualityView{
    
    if (!_qualityView) {
        _qualityView = [[HomeTongueQualityView alloc]init];
    }
    return _qualityView;
}
@end
